<!--
 * @file: umd打包后本地调试
 * @copyright: BoBo
 * @author: BoBo
 * @Date: 2020年10月30 15:58:49
-->
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <link
      rel="stylesheet"
      href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"
    />
    <link rel="stylesheet" href="../../lib/ProCrud.css" />
    <!-- 服务器地址 -->
    <script>
      window.__HOST__URL__ = "http://localhost:7788";
    </script>
    <!-- 后台url地址 -->
    <script>
      window.__PREFIX__URL__ = "/";
    </script>
  </head>
  <body>
    <div id="app">
      <el-button @click="showDialog('form')" type="primary"
        >打开表单设计器</el-button
      >
      <el-button @click="showDialog('table')" type="danger"
        >打开表格设计器</el-button
      >
      <form-designer ref="form"></form-designer>
      <table-designer ref="table"></table-designer>
      <crud-table tableName="dept" tableTitle="表格示例"></crud-table>
    </div>
  </body>
  <!-- import Vue before Element -->
  <script src="https://unpkg.com/vue/dist/vue.js"></script>
  <!-- import JavaScript -->
  <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  <script src="../../lib/ProCrud.umd.js"></script>
  <script src="https://cdn.bootcdn.net/ajax/libs/ace/test/ace.js"></script>
  <script>
    Vue.prototype.$PROCRUD = {}
    new Vue({
      el: "#app",
      methods: {
        showDialog(name) {
          this.$refs[name].showDialog();
        },
      },
    });
  </script>
</html>
